package org.sbbs.demo.webapp.action;

import org.sbbs.base.search.PropertySearchBuilder;
import org.sbbs.base.webapp.action.BaseGridAction;
import org.sbbs.demo.service.DemoTreeManager;

import com.googlecode.genericdao.search.Search;
import com.googlecode.genericdao.search.SearchResult;

public class DemoTreeLigerPagedAction
    extends BaseGridAction {
    private DemoTreeManager demoTreeManager;

    public String gridPageList() {
        Search search = PropertySearchBuilder.BuildSearch( getRequest() );
        SearchResult srt = this.demoTreeManager.searchAndCount( search );
        this.setPageList( srt.getResult() );
        this.total = srt.getTotalCount();
        return this.SUCCESS;
    }

    public DemoTreeManager getDemoTreeManager() {
        return demoTreeManager;
    }

    public void setDemoTreeManager( DemoTreeManager demoTreeManager ) {
        this.demoTreeManager = demoTreeManager;
    }

}
